home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / getit02b.zip / GETIT.PPS < prev    next >
Text File  |  1993-05-24  |  7KB  |  158 lines

  1. ;*****************************************************************************
  2. ;*                                Get Notes                                  *
  3. ;*                      John Lundell - City Lites BBS                        *
  4. ;*                                                                           *
  5. ;* Purpose:  Gets Notes from user if PSA #6 installed.  Handy to be able     *
  6. ;*           to view certain information about users.. can ask them to put   *
  7. ;*           just about anything you want here.                              *
  8. ;*                                                                           *
  9. ;*           This is my first ever attempt at any form of programming so     *
  10. ;*           please excuse the mess and the mistakes.  BUT - I would         *
  11. ;*           welcome any feedback!  City Lites has a conference dedicated    *
  12. ;*           to the PPL language and files.  Call us!                        *
  13. ;*                                                                           *
  14. ;*                  701-772-5399 - HST/DS/V.32bis Lines                      *
  15. ;*                  701-775-1143 - 2500 Lines                                *
  16. ;*                  10+ Gigs - FREE to all Long Distance Callers!!!          *
  17. ;*                                                                           *
  18. ;*           Ok, some of the ideas for GETIT.PPS were taken from others -    *
  19. ;*           most notably Clark Developments GET_ADRS.PPS and Larry Steele   *
  20. ;*           and Jerry Claxtons UAI.PPS both also avaiable on City Lites.    *
  21. ;*                                                                           *
  22. ;*****************************************************************************
  23.  
  24. ;*****************************************************************************
  25. ;* Define variable types                                                     *
  26. ;*****************************************************************************
  27.  
  28. STRING Menu_Command, Answer
  29.  
  30. ;*****************************************************************************
  31. ;* Start of Main Program                                                     *
  32. ;*****************************************************************************
  33.  
  34. ; /* Read in user information to initialize the u_addr variables */
  35.  
  36. getuser
  37.  
  38. ; /* If you have a "guest user" account then you don't want to have to force
  39. ;    then through this - or maybe you have certain user levels or users whom
  40. ;    you don't want to force through. Uncomment line 42 and edit as needed.*/
  41. ;
  42. ;if (cursec() = 55 | !(u_name() = "guest user")) goto abort
  43.  
  44. ; /* If the Address PSA is enabled then also check to see if the Address 1
  45. ;    and City fields are blank.  If so, then this user has not yet given
  46. ;    address information.                                                  */
  47.  
  48. :main
  49.  
  50. if ((strip(u_addr(0), " ") = "" & (strip(u_addr(1), " ") = "")) | (strip(u_addr(2), " ") = "") | (strip(u_addr(3), " ") = "") | (strip(u_addr(4), " ") = "")) then
  51.  
  52.  
  53.    ; /* Display GADR file (located in the same place as the PPE file.  This
  54.    ;    file can be used to display a file telling the user why the address
  55.    ;    information is being asked.                                          */
  56.  
  57.    if (exist(ppepath()+"GADR")) dispfile ppepath()+"GADR",GRAPH+SEC+LANG
  58.  
  59.    ; /* Uncomment next line to display PCBTEXT record #698 */
  60.    ; disptext 698,LFBEFORE+LFAFTER
  61.  
  62.    ; /* Get Address 1 information using PCBTEXT record #699 */
  63.    promptstr 699,u_addr(0),50,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  64.  
  65.    ; /* Get Address 2 information using PCBTEXT record #700 */
  66.    promptstr 700,u_addr(1),50,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  67.  
  68.    ; /* Get City information using PCBTEXT record #701 */
  69.    promptstr 701,u_addr(2),25,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  70.  
  71.    ; /* Get State information using PCBTEXT record #702 */
  72.    promptstr 702,u_addr(3),10,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  73.  
  74.    ; /* Get zip code information using PCBTEXT record #703 */
  75.    promptstr 703,u_addr(4),10,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  76.  
  77.    ; /* Get country information using PCBTEXT record #704 */
  78.    promptstr 704,u_addr(5),15,mask_pwd(),FIELDLEN+GUIDE+UPCASE+LFBEFORE
  79.  
  80. endif
  81.  
  82. ; /* If the Notes PSA is enabled then also check to see if the Notes Lines
  83. ;    0 is blank.  If so, then this user has not yet given notes
  84. ;                                                                         */
  85. if (psa(6) & (strip(u_notes(0)," ") = "")) then
  86.  
  87.  
  88.    ; /* Display NOTE file (located in the same place as the PPE file.  This
  89.    ;    file can be used to display a file telling the user why the notes
  90.    ;    information is being asked.                                          */
  91.  
  92.    if (exist(ppepath()+"NOTE")) dispfile ppepath()+"NOTE",GRAPH+SEC+LANG
  93.  
  94.    ; /* Get Notes Line 1                                    */
  95.    u_notes(0) = ""
  96.    inputstr "Line 1 of 5",u_notes(0),0Eh,60,mask_ascii(),FIELDLEN+GUIDE+LFBEFORE+WORDWRAP
  97.  
  98.    ; /* Get Notes Line 2                                    */
  99.    u_notes(1) = ""
  100.    inputstr "Line 2 of 5",u_notes(1),0Eh,60,mask_ascii(),FIELDLEN+GUIDE+LFBEFORE+WORDWRAP
  101.  
  102.    ; /* Get Notes Line 3                                    */
  103.    u_notes(2) = ""
  104.    inputstr "Line 3 of 5",u_notes(2),0Eh,60,mask_ascii(),FIELDLEN+GUIDE+LFBEFORE+WORDWRAP
  105.  
  106.    ; /* Get Notes Line 4                                    */
  107.    u_notes(3) = ""
  108.    inputstr "Line 4 of 5",u_notes(3),0Eh,60,mask_ascii(),FIELDLEN+GUIDE+LFBEFORE+WORDWRAP
  109.  
  110.    ; /* Get Notes Line 5                                    */
  111.    u_notes(4) = ""
  112.    inputstr "Line 5 of 5",u_notes(4),0Eh,60,mask_ascii(),FIELDLEN+GUIDE+LFBEFORE+WORDWRAP
  113.  
  114. endif
  115.  
  116. ; /* If the Notes PSA is enabled then also check to see if the Notes Lines
  117. ;    0 is blank.  If so, then this user has not yet given notes
  118. ;                                                                         */
  119. if (psa(2) & (strip(u_ver(0)," ") = "")) then
  120.  
  121.  
  122.    ; /* Display BDATE file (located in the same place as the PPE file.  This
  123.    ;    file can be used to display a file telling the user why the verify
  124.    ;    information is being asked.                                          */
  125.  
  126.    if (exist(ppepath()+"BDATE")) dispfile ppepath()+"BDATE",GRAPH+SEC+LANG
  127.  
  128.    ; /* Get Notes Line 1                                         */
  129.  
  130.    println
  131.    inputdate "Your Birthdate",u_ver(0),0Eh
  132.    println
  133.  
  134. endif
  135.  
  136. :end
  137.      if ((strip(u_addr(0), " ") = "" & (strip(u_addr(1), " ") = "")) | (strip(u_addr(2), " ") = "") | (strip(u_addr(3), " ") = "") | (strip(u_addr(4), " ") = "")) goto noinfo
  138.      if (psa(6) & (strip(u_notes(0)," ") = "")) goto noinfo
  139.      if (psa(2) & (strip(u_ver(0)," ") = "")) goto noinfo
  140.      goto seeya
  141.  
  142.  
  143. :noinfo
  144.      answer = nochar()
  145.      println
  146.      println "@X0BYou @X0FMUST@X0C@X0B answer the above information or you will be placed@X07"
  147.      println "@X0Bin this section, each time you logon to this Bulletin Board@X07"
  148.      println "@X0BSystem, until your information is logged.@X07"
  149.      println
  150.  
  151.      inputyn "Do you still want to Exit (Y/N)", Answer, 0Ah
  152.      if (answer = yeschar()) goto seeya
  153.      if (answer = nochar()) goto main
  154.  
  155. :seeya
  156.      putuser
  157.      end
  158.